home *** CD-ROM | disk | FTP | other *** search
- global numNews, curNews, wx1, wx2, strY, SSpr, uSpeed, bSetNews, arrStr, curX
-
- on NewsInit
- bSetNews = 0
- numNews = 9
- if curNews < numNews then
- curNews = curNews + 1
- else
- curNews = 1
- end if
- wx1 = 50
- wx2 = 700
- strY = 482
- SSpr = 30
- uSpeed = 2
- arrStr = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
- curX = 0
- end
-
- on NewsRedraw
- if (curNews = 0) or (bSetNews = 0) then
- bSetNews = 1
- curNews = 1
- set the member of sprite SSpr to "N" & curNews
- set the locH of sprite SSpr to wx2
- set the locV of sprite SSpr to strY
- else
- if uSpeed > 0 then
- if (the locH of sprite SSpr + the width of sprite SSpr) > wx1 then
- set the locH of sprite SSpr to the locH of sprite SSpr - uSpeed
- else
- if curNews < numNews then
- curNews = curNews + 1
- set the member of sprite SSpr to "N" & curNews
- else
- curNews = 1
- set the member of sprite SSpr to "N" & curNews
- end if
- set the locH of sprite SSpr to wx2
- end if
- else
- if the locH of sprite SSpr < wx2 then
- set the locH of sprite SSpr to the locH of sprite SSpr - uSpeed
- else
- if curNews > 1 then
- curNews = curNews - 1
- set the member of sprite SSpr to "N" & curNews
- else
- curNews = numNews
- set the member of sprite SSpr to "N" & curNews
- end if
- set the locH of sprite SSpr to wx1 - the width of sprite SSpr
- end if
- end if
- end if
- end
-
- on NewsSpeed uSpeedA
- uSpeed = uSpeedA
- end
-
- on NewsNext
- if curNews < numNews then
- curNews = curNews + 1
- set the member of sprite SSpr to "N" & curNews
- else
- curNews = 1
- set the member of sprite SSpr to "N" & curNews
- end if
- set the locH of sprite SSpr to wx2
- end
-
- on NewsPrev
- if curNews > 1 then
- curNews = curNews - 1
- set the member of sprite SSpr to "N" & curNews
- else
- curNews = numNews
- set the member of sprite SSpr to "N" & curNews
- end if
- set the locH of sprite SSpr to wx2
- end
-